<action> defines the action to perform. It can be "G[et]", "S[et]" or "C[lear]".
<field descriptor> is a litteral string containing any valid field descriptor (even lying on another card than current one), only necessary with "Get" or "Set" actions. Don't forget to enclose it in quotes, in order for it not to be interpreted by HyperCard when the XCMD is called. If you want to use the field name, you will use :
FullText "Get","cd fld" && quote & "Name" & quote
<start char> and <end char> are two optional integers, defining the starting and ending target characters of the field.
Depending on the action, those two parameters will give the following behaviour :
"Get" <none> <none> Stores the whole text of field
"Get" X <none> Stores chars X to end of field
"Get" X Y Stores chars X to Y of field
"Set" <none> <none> Replaces whole text of field
"Set" X <none> Inserts before char X of field
"Set" X Y Replaces chars X to Y of field
Hint:
If you want to insert stored text at the end of destination field, simply use a large <start char> value (30000).
Using "!", "?" and "=" as first parameter will return an online help (resp. copyright, syntax and output).
USING
The XCMD (with "Get" action) creates a global variable named FullTextHandle that contains the value of the temporary styled text handle stored in memory.
Don't change its value by yourself, or you may crash your Mac.
Meanwhile, you can test its content to know if you're ready to perform a "Set" action, it should be ≠ empty in this case.
Once "Get" has been performed, you can use the stored styled text as many times as necessary to put it or insert it into another field, which even lies on a different card of the stack. If you need to use a field from a different stack, first go it and then only use the XCMD.
When text moving is completely done, don't forget to call the XCMD with "Clear" in order to purge memory from stored styled text and empty the FullTextHandle global variable. This purge is also automatically done if you call "Get" once again.
ERRORS
If an error occurs, FullText can return :
"Error : Parameter is not a field descriptor"
"Error : Field not found"
"Error : Out of memory"
"Error : FullText requires HC 2.0"
"Error : Missing or empty action parameter"
"Error : Bad action parameter"
"Error : Missing or empty field parameter"
"Error : Parameter 2 & 3 must be integer > 0"
"Error : End char must be ≥ start char"
"Error : Must first use GetFullText"
"Error : Couldn't empty FullTextHandle global"
"Error : Couldn't get field"
"Error : Couldn't set FullTextHandle global"
"Error : Couldn't set destination field"
"Error : Cannot exceed 30000 chars in destination field"
HISTORY
2.1 07/22/93
• Added limit test for destination field
2.0 03/22/93
• Merged GetFullText & SetFullText XCMDs in a single XCMD
• Capture/restore is now possible on/to a field being on another card
Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses: